package sim.ring.gui.actions;

import org.eclipse.jface.action.Action;

import sim.ring.gui.RingingSimApp;
import sim.ring.gui.RingingSimManager;
import sim.ring.gui.dialogs.InfoDialog;

public class InfoDialogAction extends Action {

	RingingSimApp r;
	
	public InfoDialogAction(RingingSimApp parent) {
		r = parent;
		setText(r.getLocalisedData("infoDialogAction", "&Info@Ctrl+I"));
		setToolTipText(r.getLocalisedData("infoDialogActionTooltip", "Info"));
		setImageDescriptor(RingingSimManager.getIMGReg().getDescriptor("aboutInfo"));
	}
	
	@Override
	public void run() {
		super.run();
		InfoDialog dialog = new InfoDialog(r);
		dialog.open();
		r.setStatus(r.getLocalisedData("infoDialogOpened", "Info dialog opened"));
	}
	
}
